package be.darling.scrt.data;

import java.util.Comparator;

/**
 * Created by IntelliJ IDEA.
 * User: geert
 * Date: Dec 4, 2007
 * Time: 10:54:02 PM
 * To change this template use File | Settings | File Templates.
 */
public class ValueComparator implements Comparator<Value> {
    int index = 0;

    public ValueComparator(int index) {
        this.index = index;
    }

    public int compare(Value v1, Value v2) {
        if (v1.getValue(index) < v2.getValue(index) ) return -1;
        return 1;
    }
}
